//
//  DSHomeViewController.m
//  demo-圈子
//
//  Created by Mac on 15/8/13.
//  Copyright (c) 2015年 Itcast. All rights reserved.
//

#import "DSHomeViewController.h"
#import "DSShopViewController.h"
@interface DSHomeViewController ()

@end

@implementation DSHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.titleLabel.text = @"生活圈";
    
//    self.view.backgroundColor = [UIColor redColor];
    // Do any additional setup after loading the view.
}


- (IBAction)goButton:(id)sender {
    //cp
    //xib加载ViewControll的方法
    DSShopViewController *shop = [[DSShopViewController alloc]initWithNibName:nil bundle:nil];;
    
    
    [self.navigationController pushViewController:shop animated:YES];
    
    // 我让tabbar 隐藏 调用一个方法
    
    // 1 先拿到我的 UIApplication
    
    UIApplication *app = [UIApplication sharedApplication];
    
    //2通过Window拿到我的appdelegate
    AppDelegate *delegate = app.delegate;
    
    [delegate.tab pushHidden:YES];
}


@end
